package com.tryLogin.Service;

import com.tryLogin.domain.Users;
import com.tryLogin.mapper.UsersMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.List;

@Service
public class UsersServiceImpl implements UsersService{


    @Autowired
    private UsersMapper usersMapper;

    @Override
    public Users checkOne(Users u) {
        return usersMapper.checkOne(u);
    }

    @Transactional
    @Override
    public int add(Users u) {
        return usersMapper.insertUser(u);
    }

    @Override
    public int update(Users u) {
        return usersMapper.updateUser(u);
    }

    @Override
    public int delete(Users u) {
        return usersMapper.deleteUser(u);
    }

    @Override
    public List<Users> checkByTel(Users u) {
        return usersMapper.checkByTel(u);
    }


    @Override
    public List<Users> checkAll() {
        return usersMapper.checkAll();
    }
}
